Integrand size = 19, antiderivative size = 88 \[ \int (a+b \sin (c+d x)) \tan ^3(c+d x) \, dx=\frac {(2 a+3 b) \log (1-\sin (c+d x))}{4 d}+\frac {(2 a-3 b) \log (1+\sin (c+d x))}{4 d}+\frac {3 b \sin (c+d x)}{2 d}+\frac {(a+b \sin (c+d x)) \tan ^2(c+d x)}{2 d} \]
1/4*(2*a+3*b)*ln(1-sin(d*x+c))/d+1/4*(2*a-3*b)*ln(1+sin(d*x+c))/d+3/2*b*si n(d*x+c)/d+1/2*(a+b*sin(d*x+c))*tan(d*x+c)^2/d
Time = 0.08 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.93 \[ \int (a+b \sin (c+d x)) \tan ^3(c+d x) \, dx=-\frac {3 b \text {arctanh}(\sin (c+d x))}{2 d}+\frac {3 b \sec (c+d x) \tan (c+d x)}{2 d}-\frac {b \sin (c+d x) \tan ^2(c+d x)}{d}+\frac {a \left (2 \log (\cos (c+d x))+\tan ^2(c+d x)\right )}{2 d} \]
(-3*b*ArcTanh[Sin[c + d*x]])/(2*d) + (3*b*Sec[c + d*x]*Tan[c + d*x])/(2*d) - (b*Sin[c + d*x]*Tan[c + d*x]^2)/d + (a*(2*Log[Cos[c + d*x]] + Tan[c + d *x]^2))/(2*d)
Time = 0.29 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.09, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {3042, 3200, 530, 2341, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \tan ^3(c+d x) (a+b \sin (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (c+d x)^3 (a+b \sin (c+d x))dx\) |
\(\Big \downarrow \) 3200 |
\(\displaystyle \frac {\int \frac {b^3 \sin ^3(c+d x) (a+b \sin (c+d x))}{\left (b^2-b^2 \sin ^2(c+d x)\right )^2}d(b \sin (c+d x))}{d}\) |
\(\Big \downarrow \) 530 |
\(\displaystyle \frac {\frac {b^2 (a+b \sin (c+d x))}{2 \left (b^2-b^2 \sin ^2(c+d x)\right )}-\frac {\int \frac {2 \sin ^2(c+d x) b^4+b^4+2 a \sin (c+d x) b^3}{b^2-b^2 \sin ^2(c+d x)}d(b \sin (c+d x))}{2 b^2}}{d}\) |
\(\Big \downarrow \) 2341 |
\(\displaystyle \frac {\frac {b^2 (a+b \sin (c+d x))}{2 \left (b^2-b^2 \sin ^2(c+d x)\right )}-\frac {\int \left (\frac {3 b^4+2 a \sin (c+d x) b^3}{b^2-b^2 \sin ^2(c+d x)}-2 b^2\right )d(b \sin (c+d x))}{2 b^2}}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {b^2 (a+b \sin (c+d x))}{2 \left (b^2-b^2 \sin ^2(c+d x)\right )}-\frac {-a b^2 \log \left (b^2-b^2 \sin ^2(c+d x)\right )+3 b^3 \text {arctanh}(\sin (c+d x))-2 b^3 \sin (c+d x)}{2 b^2}}{d}\) |
(-1/2*(3*b^3*ArcTanh[Sin[c + d*x]] - a*b^2*Log[b^2 - b^2*Sin[c + d*x]^2] - 2*b^3*Sin[c + d*x])/b^2 + (b^2*(a + b*Sin[c + d*x]))/(2*(b^2 - b^2*Sin[c + d*x]^2)))/d
3.2.40.3.1 Defintions of rubi rules used
Int[(x_)^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symb ol] :> With[{Qx = PolynomialQuotient[x^m*(c + d*x)^n, a + b*x^2, x], e = Co eff[PolynomialRemainder[x^m*(c + d*x)^n, a + b*x^2, x], x, 0], f = Coeff[Po lynomialRemainder[x^m*(c + d*x)^n, a + b*x^2, x], x, 1]}, Simp[(a*f - b*e*x )*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Simp[1/(2*a*(p + 1)) Int[(a + b*x^2)^(p + 1)*ExpandToSum[2*a*(p + 1)*Qx + e*(2*p + 3), x], x], x]] /; FreeQ[{a, b, c, d}, x] && IGtQ[n, 0] && IGtQ[m, 0] && LtQ[p, -1] && EqQ[n, 1] && IntegerQ[2*p]
Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq* (a + b*x^2)^p, x], x] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && IGtQ[p, -2]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p _.), x_Symbol] :> Simp[1/f Subst[Int[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1) /2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2 - b ^2, 0] && IntegerQ[(p + 1)/2]
Time = 0.81 (sec) , antiderivative size = 81, normalized size of antiderivative = 0.92
method | result | size |
derivativedivides | \(\frac {a \left (\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}+\ln \left (\cos \left (d x +c \right )\right )\right )+b \left (\frac {\sin ^{5}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}+\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{2}+\frac {3 \sin \left (d x +c \right )}{2}-\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(81\) |
default | \(\frac {a \left (\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}+\ln \left (\cos \left (d x +c \right )\right )\right )+b \left (\frac {\sin ^{5}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}+\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{2}+\frac {3 \sin \left (d x +c \right )}{2}-\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(81\) |
parts | \(\frac {a \left (\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}-\frac {\ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}\right )}{d}+\frac {b \left (\frac {\sin ^{5}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}+\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{2}+\frac {3 \sin \left (d x +c \right )}{2}-\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(89\) |
risch | \(-i a x -\frac {i b \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {i b \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}-\frac {2 i a c}{d}-\frac {i \left (b \,{\mathrm e}^{3 i \left (d x +c \right )}-b \,{\mathrm e}^{i \left (d x +c \right )}+2 i a \,{\mathrm e}^{2 i \left (d x +c \right )}\right )}{d \left (1+{\mathrm e}^{2 i \left (d x +c \right )}\right )^{2}}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b}{2 d}+\frac {a \ln \left (-i+{\mathrm e}^{i \left (d x +c \right )}\right )}{d}+\frac {3 \ln \left (-i+{\mathrm e}^{i \left (d x +c \right )}\right ) b}{2 d}\) | \(177\) |
1/d*(a*(1/2*tan(d*x+c)^2+ln(cos(d*x+c)))+b*(1/2*sin(d*x+c)^5/cos(d*x+c)^2+ 1/2*sin(d*x+c)^3+3/2*sin(d*x+c)-3/2*ln(sec(d*x+c)+tan(d*x+c))))
Time = 0.28 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.02 \[ \int (a+b \sin (c+d x)) \tan ^3(c+d x) \, dx=\frac {{\left (2 \, a - 3 \, b\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (2 \, a + 3 \, b\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (2 \, b \cos \left (d x + c\right )^{2} + b\right )} \sin \left (d x + c\right ) + 2 \, a}{4 \, d \cos \left (d x + c\right )^{2}} \]
1/4*((2*a - 3*b)*cos(d*x + c)^2*log(sin(d*x + c) + 1) + (2*a + 3*b)*cos(d* x + c)^2*log(-sin(d*x + c) + 1) + 2*(2*b*cos(d*x + c)^2 + b)*sin(d*x + c) + 2*a)/(d*cos(d*x + c)^2)
\[ \int (a+b \sin (c+d x)) \tan ^3(c+d x) \, dx=\int \left (a + b \sin {\left (c + d x \right )}\right ) \tan ^{3}{\left (c + d x \right )}\, dx \]
Time = 0.20 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.83 \[ \int (a+b \sin (c+d x)) \tan ^3(c+d x) \, dx=\frac {{\left (2 \, a - 3 \, b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (2 \, a + 3 \, b\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) + 4 \, b \sin \left (d x + c\right ) - \frac {2 \, {\left (b \sin \left (d x + c\right ) + a\right )}}{\sin \left (d x + c\right )^{2} - 1}}{4 \, d} \]
1/4*((2*a - 3*b)*log(sin(d*x + c) + 1) + (2*a + 3*b)*log(sin(d*x + c) - 1) + 4*b*sin(d*x + c) - 2*(b*sin(d*x + c) + a)/(sin(d*x + c)^2 - 1))/d
Leaf count of result is larger than twice the leaf count of optimal. 22388 vs. \(2 (80) = 160\).
Time = 83.24 (sec) , antiderivative size = 22388, normalized size of antiderivative = 254.41 \[ \int (a+b \sin (c+d x)) \tan ^3(c+d x) \, dx=\text {Too large to display} \]
1/4*(3*b*log(2*(tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2*tan(1/2*c) + 2*tan(1/2*d*x)*tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2* d*x) - 2*tan(1/2*c) + 1)/(tan(1/2*d*x)^2*tan(1/2*c)^2 + tan(1/2*d*x)^2 + t an(1/2*c)^2 + 1))*tan(d*x)^2*tan(1/2*d*x)^6*tan(1/2*c)^6*tan(c)^2 - 3*b*lo g(2*(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^2*tan(1/2*c) - 2*tan(1/2 *d*x)*tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) + 2*ta n(1/2*c) + 1)/(tan(1/2*d*x)^2*tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 + 1))*tan(d*x)^2*tan(1/2*d*x)^6*tan(1/2*c)^6*tan(c)^2 + 2*a*log(4*(tan(d* x)^2*tan(c)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(d*x)^2*tan(c)^2 + tan(d*x)^2 + tan(c)^2 + 1))*tan(d*x)^2*tan(1/2*d*x)^6*tan(1/2*c)^6*tan(c)^2 + 2*a*tan( d*x)^2*tan(1/2*d*x)^6*tan(1/2*c)^6*tan(c)^2 - 6*b*log(2*(tan(1/2*d*x)^2*ta n(1/2*c)^2 + 2*tan(1/2*d*x)^2*tan(1/2*c) + 2*tan(1/2*d*x)*tan(1/2*c)^2 + t an(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 2*tan(1/2*c) + 1)/(tan(1/2 *d*x)^2*tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 + 1))*tan(d*x)*tan(1/ 2*d*x)^6*tan(1/2*c)^6*tan(c) + 6*b*log(2*(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2* tan(1/2*d*x)^2*tan(1/2*c) - 2*tan(1/2*d*x)*tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) + 2*tan(1/2*c) + 1)/(tan(1/2*d*x)^2*tan(1/2 *c)^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 + 1))*tan(d*x)*tan(1/2*d*x)^6*tan(1/ 2*c)^6*tan(c) - 4*a*log(4*(tan(d*x)^2*tan(c)^2 - 2*tan(d*x)*tan(c) + 1)/(t an(d*x)^2*tan(c)^2 + tan(d*x)^2 + tan(c)^2 + 1))*tan(d*x)*tan(1/2*d*x)^...
Time = 6.12 (sec) , antiderivative size = 176, normalized size of antiderivative = 2.00 \[ \int (a+b \sin (c+d x)) \tan ^3(c+d x) \, dx=\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,\left (a+\frac {3\,b}{2}\right )}{d}+\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,\left (a-\frac {3\,b}{2}\right )}{d}-\frac {a\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}-\frac {3\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+3\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \]
(log(tan(c/2 + (d*x)/2) - 1)*(a + (3*b)/2))/d + (log(tan(c/2 + (d*x)/2) + 1)*(a - (3*b)/2))/d - (a*log(tan(c/2 + (d*x)/2)^2 + 1))/d - (3*b*tan(c/2 + (d*x)/2) + 2*a*tan(c/2 + (d*x)/2)^2 + 2*a*tan(c/2 + (d*x)/2)^4 - 2*b*tan( c/2 + (d*x)/2)^3 + 3*b*tan(c/2 + (d*x)/2)^5)/(d*(tan(c/2 + (d*x)/2)^2 + ta n(c/2 + (d*x)/2)^4 - tan(c/2 + (d*x)/2)^6 - 1))